import React, { Component } from 'react'

class Home extends Component {

    state = {
        list: [
            {
                title: '111'
            }
        ]
    }

    render() { 
        let { list } = this.state
        return (
            <div>
                {
                    list && list.length ? list.map((item,index) => {
                        return <p key={index}>{item.title}</p>
                    }) : <div>暂无数据</div>
                }
            </div>
        )
    }
}
 
export default Home;